<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>网页内容防复制技术完全指南</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
        }
        
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        
        .card-hover {
            transition: all 0.3s ease;
        }
        
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
        }
        
        .code-block {
            background: #1e1e1e;
            color: #d4d4d4;
            border-radius: 8px;
            padding: 1.5rem;
            overflow-x: auto;
            position: relative;
        }
        
        .code-block code {
            font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
        }
        
        .section-title {
            position: relative;
            display: inline-block;
        }
        
        .section-title::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 0;
            width: 60px;
            height: 4px;
            background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
            border-radius: 2px;
        }
        
        .feature-icon {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        
        .mermaid {
            display: flex;
            justify-content: center;
            margin: 2rem 0;
        }
        
        .drop-cap {
            float: left;
            font-size: 4rem;
            line-height: 1;
            font-weight: 700;
            margin-right: 0.5rem;
            color: #667eea;
            font-family: 'Noto Serif SC', serif;
        }
        
        .highlight-box {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
            border-left: 4px solid #667eea;
            padding: 1.5rem;
            margin: 1.5rem 0;
            border-radius: 0 8px 8px 0;
        }
        
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .animate-fadeInUp {
            animation: fadeInUp 0.8s ease-out;
        }
    </style>
</head>
<body>
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20">
        <div class="container mx-auto px-6">
            <div class="max-w-4xl mx-auto text-center animate-fadeInUp">
                <h1 class="text-5xl md:text-6xl font-bold mb-6">
                    网页内容防复制技术
                    <span class="block text-3xl md:text-4xl mt-4 font-light opacity-90">完全指南</span>
                </h1>
                <p class="text-xl md:text-2xl font-light leading-relaxed opacity-90">
                    从基础CSS到高级JavaScript，掌握全方位的内容保护策略
                </p>
                <div class="mt-10 flex justify-center space-x-6">
                    <div class="text-center">
                        <i class="fas fa-shield-alt text-4xl mb-2"></i>
                        <p class="text-sm">安全防护</p>
                    </div>
                    <div class="text-center">
                        <i class="fas fa-code text-4xl mb-2"></i>
                        <p class="text-sm">代码实现</p>
                    </div>
                    <div class="text-center">
                        <i class="fas fa-users text-4xl mb-2"></i>
                        <p class="text-sm">用户体验</p>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Introduction -->
    <section class="py-16 bg-white">
        <div class="container mx-auto px-6">
            <div class="max-w-4xl mx-auto">
                <p class="text-lg leading-relaxed text-gray-700">
                    <span class="drop-cap">在</span>数字化时代，内容保护成为许多网站和应用的重要需求。无论是保护原创文章、防止代码泄露，还是维护商业机密，禁止用户复制功能都扮演着关键角色。然而，仅仅依靠CSS的<code class="bg-purple-100 text-purple-800 px-2 py-1 rounded">user-select: none</code>属性往往无法应对所有场景，用户仍然可以通过多种方式绕过这些基础限制。
                </p>
            </div>
        </div>
    </section>

    <!-- Technology Overview -->
    <section class="py-16 bg-gray-50">
        <div class="container mx-auto px-6">
            <div class="max-w-6xl mx-auto">
                <h2 class="text-3xl font-bold text-center mb-12">
                    <span class="section-title">技术架构概览</span>
                </h2>
                <div class="mermaid">
                    graph TD
                        A[内容保护技术] --> B[CSS样式控制]
                        A --> C[JavaScript事件拦截]
                        A --> D[高级防护技术]
                        
                        B --> B1[user-select属性]
                        B --> B2[浏览器兼容性]
                        B --> B3[选择器优化]
                        
                        C --> C1[键盘事件监听]
                        C --> C2[鼠标右键禁用]
                        C --> C3[剪贴板拦截]
                        
                        D --> D1[动态内容保护]
                        D --> D2[水印技术]
                        D --> D3[服务端验证]
                        
                        style A fill:#667eea,stroke:#fff,stroke-width:2px,color:#fff
                        style B fill:#9f7aea,stroke:#fff,stroke-width:2px,color:#fff
                        style C fill:#9f7aea,stroke:#fff,stroke-width:2px,color:#fff
                        style D fill:#9f7aea,stroke:#fff,stroke-width:2px,color:#fff
                </div>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="py-16">
        <div class="container mx-auto px-6">
            <div class="max-w-6xl mx-auto">
                
                <!-- Section 1: CSS Solutions -->
                <section class="mb-16">
                    <div class="bg-white rounded-2xl shadow-xl p-8 card-hover">
                        <h2 class="text-3xl font-bold mb-8 flex items-center">
                            <i class="fas fa-palette feature-icon text-4xl mr-4"></i>
                            <span class="section-title">CSS样式控制方案</span>
                        </h2>
                        
                        <div class="space-y-8">
                            <div>
                                <h3 class="text-xl font-semibold mb-4 text-gray-800">
                                    <i class="fas fa-ban text-purple-600 mr-2"></i>
                                    user-select属性详解
                                </h3>
                                <p class="text-gray-600 mb-4">CSS的user-select属性是最基础的文本选择控制方案。通过设置不同的值，可以实现不同程度的文本选择限制。</p>
                                <div class="code-block">
                                    <code>/* 禁止选择所有文本 */
.no-select {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* 只允许选择文本，禁止选择其他元素 */
.text-only {
    user-select: text;
    -webkit-user-select: text;
}</code>
                                </div>
                            </div>
                            
                            <div class="highlight-box">
                                <p class="text-gray-700">
                                    <i class="fas fa-lightbulb text-yellow-500 mr-2"></i>
                                    <strong>提示：</strong>不同浏览器对user-select属性的支持程度不同，特别是WebKit内核的浏览器需要添加前缀。
                                </p>
                            </div>
                        </div>
                    </div>
                </section>

                <!-- Section 2: JavaScript Solutions -->
                <section class="mb-16">
                    <div class="bg-white rounded-2xl shadow-xl p-8 card-hover">
                        <h2 class="text-3xl font-bold mb-8 flex items-center">
                            <i class="fas fa-code feature-icon text-4xl mr-4"></i>
                            <span class="section-title">JavaScript事件拦截技术</span>
                        </h2>
                        
                        <div class="grid md:grid-cols-2 gap-8">
                            <div>
                                <h3 class="text-xl font-semibold mb-4 text-gray-800">
                                    <i class="fas fa-keyboard text-purple-600 mr-2"></i>
                                    键盘事件监听与阻止
                                </h3>
                                <p class="text-gray-600 mb-4">通过监听键盘事件，可以阻止用户使用快捷键进行复制操作。</p>
                                <div class="code-block">
                                    <code>// 阻止复制快捷键
document.addEventListener('keydown', function(e) {
    // 阻止 Ctrl+C (复制)
    if (e.ctrlKey && e.key === 'c') {
        e.preventDefault();
        return false;
    }
});</code>
                                </div>
                            </div>
                            
                            <div>
                                <h3 class="text-xl font-semibold mb-4 text-gray-800">
                                    <i class="fas fa-mouse text-purple-600 mr-2"></i>
                                    鼠标右键菜单禁用
                                </h3>
                                <p class="text-gray-600 mb-4">禁用右键菜单是防止用户通过上下文菜单复制内容的有效方法。</p>
                                <div class="code-block">
                                    <code>// 禁用右键菜单
document.addEventListener('contextmenu', function(e) {
    e.preventDefault();
    return false;
});</code>
                                </div>
                            </div>
                        </div>
                    </div>
                </section>

                <!-- Section 3: Advanced Techniques -->
                <section class="mb-16">
                    <div class="bg-white rounded-2xl shadow-xl p-8 card-hover">
                        <h2 class="text-3xl font-bold mb-8 flex items-center">
                            <i class="fas fa-shield-alt feature-icon text-4xl mr-4"></i>
                            <span class="section-title">高级防护技术</span>
                        </h2>
                        
                        <div class="grid md:grid-cols-3 gap-6">
                            <div class="bg-gray-50 rounded-lg p-6">
                                <div class="text-center mb-4">
                                    <i class="fas fa-sync-alt text-4xl text-purple-600"></i>
                                </div>
                                <h3 class="text-lg font-semibold mb-2 text-center">动态内容保护</h3>
                                <p class="text-gray-600 text-sm">对于动态生成的内容，需要实时应用保护措施，确保新增内容也受到保护。</p>
                            </div>
                            
                            <div class="bg-gray-50 rounded-lg p-6">
                                <div class="text-center mb-4">
                                    <i class="fas fa-stamp text-4xl text-purple-600"></i>
                                </div>
                                <h3 class="text-lg font-semibold mb-2 text-center">水印技术应用</h3>
                                <p class="text-gray-600 text-sm">通过添加水印，即使内容被复制也能追踪来源，保护知识产权。</p>
                            </div>
                            
                            <div class="bg-gray-50 rounded-lg p-6">
                                <div class="text-center mb-4">
                                    <i class="fas fa-server text-4xl text-purple-600"></i>
                                </div>
                                <h3 class="text-lg font-semibold mb-2 text-center">服务端验证配合</h3>
                                <p class="text-gray-600 text-sm">结合服务端验证，提供更强大的保护机制，防止客户端绕过。</p>
                            </div>
                        </div>
                    </div>
                </section>

                <!-- Best Practices -->
                <section class="mb-16">
                    <div class="bg-gradient-to-r from-purple-600 to